package com.cisdi.blog.service;

import com.cisdi.blog.entity.Blog;
import com.cisdi.blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author pengyangyan
 * @version 1.0.0
 * @date 2020年03月19日 16:37:00
 */
public interface BlogService {

    Long getBlogTotal();

    Blog getBlog(Long id);

    Blog show(Long id);

    Page listBlog(Pageable pageable, BlogQuery query);

    Page listBlog(Pageable pageable, String query);

    Page listBlog(Long tagId,Pageable pageable);

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id,Blog blog);

    void removeBlog(Long id);

    List<Blog> hotBlog(Integer size);

    List<Map<String, Object>>  getArchiveMap();
}
